package com.onetech.adrewards.free.adapters;

import java.util.List;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.onetech.adrewards.free.fragments.ImageSlideFragment;
import com.onetech.adrewards.free.objects.SlideDTO;

public class SlideFragmentAdapter extends FragmentPagerAdapter{
    public List<SlideDTO> mData=null;
    private Context context;
    public SlideFragmentAdapter(Context _context,FragmentManager fm) {
        super(fm);
        context=_context;
    }
    public SlideFragmentAdapter(Context _context,FragmentManager fm,List<SlideDTO> _mData) {
        super(fm);
        context=_context;
        mData=_mData;
    }
    @Override
    public Fragment getItem(int position) {
    	return ImageSlideFragment.newInstance("",mData.get(position));
    }

    @Override
    public int getCount() {
        return mData.size();
    }
}